<template>
    <div>
        <label>用户名 <input type="text" v-model="username"></label>
        <label>密码 <input type="password" v-model="password"></label>
        <button @click="reset">重置</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            username: '',
            password: ''
        }
    },
    methods: {
        reset() {
            this.username = ''
            this.password = ''
        }
    }
};
</script>

<style></style>